package cn.hct.springboot_pro.dao;

import cn.hct.springboot_pro.entity.Orders;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
@Mapper
public interface OrderMapper {
    int addOrder(@Param("item_id")int item_id,@Param("user_id")int user_id,@Param("item_name")String item_name,@Param("order_price")int order_price,@Param("consignee")String consignee,@Param("addr")String addr,@Param("contact_way")String contact_way,@Param("creat_time")String creat_time);

    Orders getOrderById(@Param("order_id")int order_id);

    Orders getOrderByTimeAndItem(@Param("item_id")int item_id, @Param("creat_time")String creat_time);

    List<Orders> getOrderByUId(@Param("user_id")int user_id);

    List<Orders> getOrder();

    int deleteOrderById(@Param("order_id")int order_id);

    Orders getOrderByItem(@Param("item_id")int item_id);






}
